/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.dp.vo;

import java.io.Serializable;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author wyr
 */
@Embeddable
public class NewsUserorderPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "clientid")
    private int clientid;
    @Basic(optional = false)
    @Column(name = "contentid")
    private int contentid;

    public NewsUserorderPK() {
    }

    public NewsUserorderPK(int clientid, int contentid) {
        this.clientid = clientid;
        this.contentid = contentid;
    }

    public int getClientid() {
        return clientid;
    }

    public void setClientid(int clientid) {
        this.clientid = clientid;
    }

    public int getContentid() {
        return contentid;
    }

    public void setContentid(int contentid) {
        this.contentid = contentid;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) clientid;
        hash += (int) contentid;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof NewsUserorderPK)) {
            return false;
        }
        NewsUserorderPK other = (NewsUserorderPK) object;
        if (this.clientid != other.clientid) {
            return false;
        }
        if (this.contentid != other.contentid) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.dp.vo.NewsUserorderPK[clientid=" + clientid + ", contentid=" + contentid + "]";
    }

}
